blaaskaak
Enthusiast
Registered: 02/25/07
Posts: 329
Loc: The Netherlands
When you merge 2 threads together you end up with a thread that has more then 1 topictitle. Confusing, because the last-reply subject put on the main forum index.
Also when you move a post with it's reply's to a new topic, you often want to rename the topic. And sometimes, well, you want want to rename a topic. Get a spell error out, and get that spell error also out of the subjects in the reply.
This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.
Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
Thanks blaaskaak, the zip file is fine now and I've successfully integrated your mod! Me likes!
I have a couple of considerations for future revisions:
1. It would be nice to be given an opportunity, via js popup or form, to enter a "new" name for the topic. This saves you from having to manually edit the first post, which lazy admins like me would really appreciate!
2. When moving/merging threads, have the option of renaming as well. This would be really useful for when you're moving sub-threads that have gone off topic.
blaaskaak
Enthusiast
Registered: 02/25/07
Posts: 329
Loc: The Netherlands
I am also lazy, so I like to leave stuff that's already in ubb to ubb.
Not having my own box to edit a topictitle saves me the code to make sure the current subject is correct
Originally Posted By: Myke
1. It would be nice to be given an opportunity, via js popup or form, to enter a "new" name for the topic. This saves you from having to manually edit the first post, which lazy admins like me would really appreciate!
Alternative (less work and safer to code) would be to have a checkbox when you edit the first post of a topic with "Rename the rest also".
Heck, for our board a checkbox would not even be needed. We can force it always.
blaaskaak
Enthusiast
Registered: 02/25/07
Posts: 329
Loc: The Netherlands
Originally Posted By: blaaskaak
Heck, for our board a checkbox would not even be needed. We can force it always.
For those interested,
if you modify /scripts/modifypost.inc.php by finding
Code:
if ($post_is_topic == true) {
and adding this below
Code:
// Rename entire topic if first post is editted.
$newSubject="Re: ".$Subject;
$query = "
UPDATE {$config['TABLE_PREFIX']}POSTS
SET POST_SUBJECT = ?
WHERE TOPIC_ID = ?
AND POST_IS_TOPIC = 0
";
$dbh -> do_placeholder_query($query,array($newSubject,$topic_id),__LINE__,__FILE__);
You rename an entire topic simply by editing the first post. This also works if a user renames the subject.
blaaskaak
Enthusiast
Registered: 02/25/07
Posts: 329
Loc: The Netherlands
Me too, I just put it on our liveboard
Nothing like installing a hack just before bedtime and seeing what you'll wake up to in the morning
I've always disliked how threads handled subjects. We were used to classic, where topicstarter sets the topic, and that's it. It's so stupid to see topic subject X on the main forum page, and you can't find that same topic subject on the overview of that specific forum.
When you merge 2 threads together you end up with a thread that has more then 1 topictitle. Confusing, because the last-reply subject put on the main forum index.
Also when you move a post with it's reply's to a new topic, you often want to rename the topic. And sometimes, well, you want want to rename a topic. Get a spell error out, and get that spell error also out of the subjects in the reply.
This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.
Enjoy! Or not Whatever makes you happy
Hi, When I click on 'rename this topic', it says 'the selected action has been completed' That's all, no oppertunity to insert a new name for the topic.. Did I do something wrong? I followed the instructions step by step
Registered: 09/06/99
Posts: 97
Loc: Sydney, Australia
You've done nothing wrong, this is how the mod works. Read the original post a little more carefully:
Quote:
This hack adds a menu option to the "manage topic" menu for mods and admins that renames an entire thread according to the subject of post #1 in that topic.
So whatever the subject of the first post is, all replies inherit that subject with a "Re: " prefixed.